package com.qiaofang.applet.service.member.repository;

import com.qiaofang.applet.service.member.domain.Department;
import com.qiaofang.applet.service.member.service.dto.DeptSimpleListDto;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

public interface DepartmentRepository extends MongoRepository<Department, String> {
    Department findByDeptUuidAndCompanyUuid(String deptUuid, String companyUuid);

    List<Department> findAllByCorporationCode(String corporationCode);

    List<DeptSimpleListDto> findAllByCorporationCodeAndCityCode(String corporationCode, String cityCode);

    List<DeptSimpleListDto> findAllByCorporationCodeAndCompanyUuid(String corporationCode, String companyUuid);

    Department findByCorporationCodeAndCompanyUuidAndDeptUuid(String corporationCode, String companyUuid, String deptUuid);

    List<Department> findListByDeptUuidInAndCompanyUuid(List<String> deptUuids, String companyUuid);

    Department findByCorporationCodeAndDeptUuid(String corporationCode, String deptUuid);

    List<Department> findListByDeptUuidInAndCorporationCode(List<String> deptUuids, String corporationCode);

}
